Repository navigation
Conversation
|
There is an issue in commit f4b298b:
|
becm
force-pushed
the
fix-fast-import-commit-from-existing
branch
2 times, most recently
from
October 9, 2026 23:29
2def667 to
90729d9
Compare
Queries for commits created during the same 'git fast-import' session
result in a crash:
< reset refs/heads/newbranch
< from <new-commit-oid>
> fatal: not a valid commit: <new-commit-oid>
Getting file content for commit has no issue (working implementation):
< ls <new-commit-oid> file-in-new-commit.txt
> {file content}
During import, new objects may not (yet) be reachable via the ODB layer.
Try to resolve requested tag/commit via object cache first
to avoid crash and (eventually) improve lookup speed.
Signed-off-by: Marc Becker <becm@gmx.de>
becm
force-pushed
the
fix-fast-import-commit-from-existing
branch
from
October 10, 2026 14:54
90729d9 to
4e50f63
Compare
Author
|
/submit |
|
Submitted as pull.2252.git.1791653078449.gitgitgadget@gmail.com To fetch this version into To fetch this version to local tag |
|
Aniket Gupta wrote on the Git mailing list (how to reply to this email): Hello Marc,
Sorry for the noise, my first mail lost its In-Reply-To header on the
way, so it is not in this thread. Resending the same review here.
I tried this on top of 6de20f609 with DEVELOPER=1 and did not get warnings.
> Queries for commits created during the same 'git fast-import' session
> result in a crash:
> < reset refs/heads/newbranch
> < from <new-commit-oid>
> > fatal: not a valid commit: <new-commit-oid>
I was able to repro this. With the patch fsck is clean and it works
nicely. Same goes for "commit" with "from <new-oid>", a tag made in
the same session, and a tag of a tag. Existing commits and tags and
"from <blob>" behave like before.
One small nitpick: there is a double space in "'git fast-import' session".
> to avoid crash and (eventually) improve lookup speed.
Did you measure this? If not, maybe drop it or say it is only a
possible side effect.
> +static struct object_entry *dereference(struct object_entry *oe, struct object_id *oid);
This is over 80 columns, can it be wrapped like the definition?
> builtin/fast-import.c | 18 ++++++++++++++----
I could not find a test for this. Can you add one to t9300? You can
get the new oid with get-mark and use it in a "reset ... from <oid>"
in the same stream.
Thanks,
Aniket |
|
User |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cc: Aniket Gupta aniketgupta3001@gmail.com